package com.beiding.jsonanalyzer.utils;

/**
 * @author 丁常磊
 * @date 2022/6/25 15:34
 */

public class TextUtils {
    public static String addFormat(Object text, String format) {
        String t = text + "";
        char[] chars = t.toCharArray();
        StringBuilder builder = new StringBuilder();
        for (char aChar : chars) {
            builder.append(aChar);
            if (aChar == '\n') {
                builder.append(format);
            }
        }
        return builder.toString();
    }
}
